/*
 * quater.h
 *
 *  Created on: 02.11.2012
 *      Author: Myrex
 */

#ifndef QUATER_H_
#define QUATER_H_

#define PRECISION 0.0000000001


typedef struct {
	double re;
	double i;
	double j;
	double k;
} quater_t;

typedef enum {
	qtr_ok = 0,
} qtr_err_e;


qtr_err_e quatr_init(quater_t *qt, double re, double i, double j , double k);
qtr_err_e quatr_build( quater_t *qt, double psi, double theta, double gamma);


qtr_err_e quatr_sum(quater_t *qtR, quater_t *qtA , quater_t *qtB);
qtr_err_e quatr_mul(quater_t *qtR, quater_t *qtA , quater_t *qtB);
qtr_err_e quatr_conj(quater_t *qtR, quater_t *qtS);

qtr_err_e quatr_normalize(quater_t *qtR, quater_t *qtS);

#endif /* QUATER_H_ */


